*****************************************
* Survival of the Fittest: Replication  *
*    Why Terrorist Groups Endure        *
* Author:  Joseph Young and Laura Dugan *
* Date: 5/12/14                         *
*****************************************

//Data for Replication
use young_dugan_pot_2014.dta

****************************
* Summary Stats (Table 1)  *
****************************
summ fail numberofgroups topdog  multtact_f multcountry_f gdp_100 logpop lmtnest polity2 durable ethfrac relfrac muslim coldwar  Europe Africa Asia America lifeyrs if keepinmodel~=. 

******************************
* Main models (Table 2)      *
******************************

*Without interaction (Model 1)
logit fail numberofgroups topdog multtact_f multcountry_f gdp_100 logpop lmtnest polity2 durable ethfrac relfrac coldwar muslim Europe Africa Asia America lifeyrs lifeyrs2 lifeyrs3, or vce(cluster cowcode)

*With interaction (Model 2)
logit fail numberofgroups topdog top_numb multtact_f multcountry_f gdp_100 logpop lmtnest polity2 durable ethfrac relfrac coldwar muslim Europe Africa Asia America lifeyrs lifeyrs2 lifeyrs3, or vce(cluster cowcode)

*USING LRT to test
logit fail topdog numberofgroups multtact_f multcountry_f gdp_100 logpop lmtnest polity2 durable ethfrac relfrac coldwar muslim Europe Africa Asia America lifeyrs lifeyrs2 lifeyrs3
est store R
logit fail topdog numberofgroups top_numb multtact_f multcountry_f gdp_100 logpop lmtnest polity2 durable ethfrac relfrac coldwar muslim Europe Africa Asia America lifeyrs lifeyrs2 lifeyrs3
est store U
lrtest R U


